#ifndef ThreeDCubeGameEnemy_H
#define ThreeDCubeGameEnemy_H

#include "DisplayableObject.h"
#include "MyMovementPosition.h"

class BaseGameEngine;
class ThreeDCubeGame;

class ThreeDCubeGameEnemy :
	public DisplayableObject
{
public:
	ThreeDCubeGameEnemy(ThreeDCubeGame* pGame, int iMapX, int iMapY, int iCurrentDirection, int iColour);

	virtual ~ThreeDCubeGameEnemy(void);

	void Draw();

	void DoUpdate( int iCurrentTime );

	void SetMovementPosition( int iMoveDuration );

	// Offset within tile at which to draw the object
	static const int POSITION_OFFSET_X = 0;
	static const int POSITION_OFFSET_Y = 0;

	/**
	Return true if cell at the specified coordinates can be entered by player.
	*/
	bool CanEnter( int iMapX, int iMapY );

	/** Determine whether enemy can move in direction */
	bool CanMoveInDirection( int iDirection );

	/** Actually move in a specific direction */
	void SetDirectionAndMove( int iDirection, int iTimeDelay );

	/** Check for collision between this char and enemy */
	void CheckCollision();

private:
	/** Map X coordinate */
	int m_iCurrentMapX;
	/** Map Y coordinate */
	int m_iCurrentMapY;

	/** Map X coordinate */
	int m_iNextMapX;
	/** Map Y coordinate */
	int m_iNextMapY;

	/** Current movement direction */
	int m_iCurrentDirection;

	/** Draw colour */
	int m_iColour;

	/** Enemy type - sets colour and behaviour */
	int m_iType;

	/** Movement position */
	MyMovementPosition m_oMovement;

	/** Original X stored */
	int m_iOriginalX;
	/** Original Y stored */
	int m_iOriginalY;
};

#endif
